<!--<table id="goods-out-table" lay-filter="goods-out-table"></table>-->
<fieldset class="layui-elem-field">
    <legend>批量排班</legend>
    <div class="layui-field-box">
        <table class="layui-table" lay-skin="line" >
            <colgroup>
                <col width="20%">
                <col width="20%">
                <col width="20%">
                <col width="20%">
                <col width="20%">
            </colgroup>
            <thead>
            <tr>
                <th>日期</th>
                <th>开始城市</th>
                <th>结束城市</th>
                <th>价格</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody class="skd_item">
            {for start="0" end="$date_days" comparison="elt"}
                <tr class="first_skd">
                    <td>
                        <input type="text" value="{$date_range + ($i*86400)|date='Y-m-d'}" name="skd_date[]" placeholder="时间" autocomplete="off" class="layui-input skd_date">
                    </td>
                    <td>
                        <select name="begin_city[]" >
                            <option value="">请选择开始城市(不选择由系统匹配)</option>
                            {foreach $city_list as $key=>$val}
                            <option value="{$val->id}">{$val->name}</option>
                            {/foreach}
                        </select>
                    </td>
                    <td>
                        <select name="end_city[]" >
                            <option value="">请选择开始城市(不选择由系统匹配)</option>
                            {foreach $city_list as $key=>$val}
                            <option value="{$val->id}">{$val->name}</option>
                            {/foreach}
                        </select>
                    </td>
                    <td>
                        <input type="text" name="price[]" placeholder="价格(不选择由系统匹配)" autocomplete="off" class="layui-input">
                    </td>
                    <!--<td>-->
                        <!--<select name="type[]" >-->
                            <!--<option value="1">全天</option>-->
                            <!--<option value="2">上午</option>-->
                            <!--<option value="3">下午</option>-->
                        <!--</select>-->
                    <!--</td>-->
                    <td>
                        <button type="button" class="layui-btn layui-btn-sm add_ticket" onclick="add_skd()">
                            <i class="layui-icon">&#xe654;</i>
                        </button>
                        <button type="button" class="layui-btn layui-btn-danger layui-btn-sm cut_ticket" onclick="remove_skd(this)">
                            <i class="layui-icon">&#xe640;</i>
                        </button>
                    </td>
                </tr>
            {/for}
            </tbody>
        </table>
    </div>
</fieldset>

<script>
    layui.config({
        base: '__ADMIN__/Layui/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'laydate'], function(){
        var $ = layui.$
            ,laydate = layui.laydate

        $('.skd_date').each(function(i){
            laydate.render({
                elem: this
                ,min: 0
                ,max: 31
            });
        });

    });
</script>